// 方括号
const arr: number[] = [1, 2, 3]
// arr.push(true)
// 数组泛型
const arr1: Array<string> = ['1', '2', '3']

const arr2: Array<string | number> = ['1', '2', '3', 4]


interface Person1 {
  name: string;
  age: number;
  arr?: string[]
}

const arr3: Person1[] = [{ name: 'jack', age: 18 }]

interface Arr {
  [index: number]: string
}
const arr4: Arr = ['aa', 'bbb']
const arr5: string[] = ['aa', 'bbb']


